package br.edu.ufcg.sig.query;

import br.edu.ufcg.sig.query.persistencia.QueryService;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class QueryExecutorImpl extends RemoteServiceServlet implements
		QueryExecutorInterface {

	private static final long serialVersionUID = -4041548074271114539L;

	private QueryService service;

	public QueryExecutorImpl() {
		service = new QueryService();
	}

	@Override
	public QueryTable executeQuery(String query) throws Exception {
		try {
			return service.executeQuery(query);
		} catch (Exception e) {
			throw new RuntimeException(e.getMessage());
		}
	}

}
